<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport"
          content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Document</title>
    <script src="https://cdn.jsdelivr.net/npm/vue@2.7.16/dist/vue.js"></script>
</head>
<body>
<div id="root">

</div>
<script>
    const array1 = [231, 3, 11, 31, 35, 13, 13, 5, 1, 31, 31, 35, 135, 1, 351, 351, 35, 1453, 46, 64, 5, 845, 84, 53, 435, 45, 343, 414, 34, 354, 354, 354, 35, 435, 43]
    let array2 = []
    let num = 1
    for (let i = 0, j = 0; i < array1.length; i += 5, j++) {
        let result = 0, k = 0
        for (k; k < 5; k++) {
            result += array1[i + k]
        }
        array2[j] = result / k
    }
    const root = document.getElementById('root')
    for (let i = 0; i < array2.length; i++) {
        root.innerHTML += array2[i] + '，'
    }
</script>

</body>
</html>